<?php /* Widget Title: Featured Brands & Stores */ ?>

<?php
/* Widget Content */

$brand_pod = new Pod('brand');
$brand_pod->page = 1;
$brand_pod->search = false;
$brand_pod->findRecords('id DESC', 6, "t.featured = '1'");
while ($brand_pod->fetchRecord()){
	$brand_name = $brand_pod->get_field('name');
	$brand_logo = $brand_pod->get_field('logo');
	$med_image = wp_get_attachment_image_src($brand_logo[0][ID], 'thumbnail', false);
    $med_image = $med_image[0];
	$brand_url =  $brand_pod->get_field('brandurl');
	echo '<div style="float:left;margin-right:10px;width:115px;margin-bottom:10px;"><a href="'.BUZZR_URL.'/brands/'.$brand_url.'">';
	if(!empty($brand_logo)){
		echo '<img src="'.$med_image.'" alt="'.$brand_name.' Offers & Deals" title="'.$brand_name.' Offers & Deals" /><br />';
	}
	echo '</a></div>';
}
echo '<div style="clear: both;"></div>';

/* Widget Content */
?>

<?php
/* Widget Logic */ 
is_pod_page()
/* Widget Logic */ 
?> 